from flask import session
# 导入Flask_script
from flask_script import Manager
# 导入扩展迁移框架，创建表
from flask_migrate import Migrate, MigrateCommand
# 导入app
from info import create_app, db

app = create_app('development')
# 实例化管理器对象
manager = Manager(app)
# 使用迁移对象
Migrate(app, db)
# 通过管理器对象，添加迁移命令
manager.add_command('db',MigrateCommand)



if __name__ == '__main__':
    # 打印视图映射
    print(app.url_map)
    manager.run()